Scanner devices Commands for scanner devices
SCSI-2

15.1 Model for scanner devices

Scanner devices generate a digital representation of two- or three- dimensional objects (e.g. a page of text, a photograph, or a piece of art). This is accomplished by sensing the amount of light reflected from the object and generating the digital data. The digital data can then be sent across the SCSI bus to an initiator for further processing.

There are two types of scanners in use; in one type, the operations and functions of the scanner are fixed; in the other type, the operations and functions are programmable and need to be set up prior to being used for scanning objects.

The scanner device generates the data and transfers it in accordance with the commands received from the initiator. The contents of the data is vendor-specific; therefore, the initiator and the scanner must know how to use the contents of the data.

Scanners generate a digital image of an object in a two dimensional plane. The x-axis dimension is along the cross-scan direction that is perpendicular to the direction in which a scan occurs. The y-axis dimension is along the scan direction, and is parallel to the direction in which a scan occurs. The coordinates are measured from the upper left hand corner of the two dimensional plane. The x-axis measurement increases in a positive manner going from left to right. The left side of the two dimensional plane (i.e. where x equals zero) is called the base element line. The y-axis measurement increases in a positive manner going from top to bottom. The top side of the two dimensional plane (i.e. where y equals zero) is called the base line. The scanning range encompasses the area in which the scanner can operate, from the scan line and base line to the maximum x and y position. These conventions are adopted to aid in understanding the fields within the command descriptor blocks and parameters used for scanner devices. As such this is a conceptual model and may not accurately reflect the physical device.

The displacements used for positioning windows is independent of the resolution with which a window is scanned. The measurement of displacements is controlled by the scan measurement mode parameters.

In the event of a scanner automatic creation of sub-windows within a defined window (i.e. the auto bit in the DEFINE WINDOW parameters is one), one of the following responses is appropriate:

  1. the initiator may issue a GET WINDOW PARAMETERS command prior to any READ commands;
  2. if the initiator issues a READ command before issuing a GET WINDOW PARAMETERS command, the target shall return CHECK CONDITION status. The ILI and valid bits in the sense data shall be set to one. The initiator should then issue a GET WINDOW PARAMETERS command. This feature is useful when the scanner has the ability to distinguish between image and text data and to define windows accordingly.

It may occur that a scanner device temporarily does not have resources available to manage a data transfer from the initiator or does not have data available to transfer to the initiator. One of the following responses is appropriate in such a case:

  1. A CHECK CONDITION status is returned and the sense key is set to NOT READY with the appropriate additional sense code. This response is applicable to a TEST UNIT READY command.
  2. The target disconnects until the resource or data are available, and then reconnects to resume the operation.
  3. A BUSY status is returned.

If the scanner device determines that an error or exception condition has occurred while executing the SCSI command from the initiator, a CHECK CONDITION status is returned. A REQUEST SENSE command can then be used to determine additional information regarding the error or exception condition.